import request from '@/utils/request'

export function fuzzyQueryOrderItem(data) {
  return request({
    url: '/orderItem/fuzzyQueryOrderItem',
    method: 'get',
    params: data
  })
}

export function deleteOrderItem(id) {
  return request({
    url: '/orderItem/deleteOrderItem/' + id,  // 注意这个是路径参数
    method: 'get'
  })
}

export function deleteOrderItemBatch(ids) {
  return request({
    url: '/orderItem/deleteBatchItems',
    method: 'get',
    params: {
      ids:ids.join(',')   /* 数组转换成字符串 */
    }
  })
}
export function addOrderItem(orderItem) {
  return request({
    url: '/orderItem/addOrderItem',
    method: 'post',
    data: orderItem
  })
}

export function uploadExcel(orderItem) {
  return request({
    url: '/orderItem/upload/excel',
    method: 'post',
    data: orderItem
  })
}

